// 使用require加载http核心模块
// var http = require('http')
// http.createServer(function(req,res){
//     res.writeHead(200,{'Content-Type':'text/plain'})
//     res.write('Hello Nodejs\n')
//     res.end('Hello World\n')
// }).listen(2018)
// console.log('server running at http://127.0.0.1:2018')

var http = require('http')
var server = http.createServer();

server.on('request',function () {
    console.log('受到客户端请求了!')
})

server.listen(3000,function () {
    console.log('3000端口启动成功')
})

